﻿/**
 *
 * @file VAOneXMLAdaptorFrequencyDomain.h
 * @brief VAOne读写适配器频率
 * @author XingXuanCi (xingxuanci@diso.cn)
 * @date 2024-11-01
 *
 */
#ifndef VAONEXMLADAPTORFREQUENCYDOMAIN_H
#define VAONEXMLADAPTORFREQUENCYDOMAIN_H

#include "FITKVAOneXMLIOAPI.h"
#include "FITKAbstractVAOneXMLAdaptor.h"
#include "FITK_Kernel/FITKCore/FITKCoreMacros.h"
#include "FITK_Kernel/FITKAdaptor/FITKIOAdaptorFactory.h"


namespace Acoustics
{
class FITKAcousticsAbstractSpectra;
}

namespace IO
{
    /**
     * @brief   VAOne读写适配器频率
     * @author  XingXuanCi (xingxuanci@diso.cn)
     * @date    2024-11-1
     */
    class FITKVAOneXMLIOAPI VAOneXMLAdaptorFrequencyDomain : public FITKAbstractVAOneXMLAdaptor
    {
        FITKCLASS(IO, VAOneXMLAdaptorFrequencyDomain);
    public:

        /**
         * @brief   构造函数
         * @author  XingXuanCi (xingxuanci@diso.cn)
         * @date    2024-11-01
         */
        explicit VAOneXMLAdaptorFrequencyDomain()= default;
        /**
         * @brief   析构函数
         * @author  XingXuanCi (xingxuanci@diso.cn)
         * @date    2024-11-01
         */
        ~VAOneXMLAdaptorFrequencyDomain() = default;
        /**
         * @brief   适配器读数据
         * @return  是否执行成功
         * @author  XingXuanCi (xingxuanci@diso.cn)
         * @date    2024-11-01
         */
        bool adaptR() override;
        /**
         * @brief   适配器写数据
         * @return  是否执行成功
         * @author  XingXuanCi (xingxuanci@diso.cn)
         * @date    2024-11-01
         */
        bool adaptW() override;

    private:
        /**
         * @brief   读取频率数据
         * @return  是否执行成功
         * @author  XingXuanCi (xingxuanci@diso.cn)
         * @date    2024-11-01
         */
        bool readFrequencyDomain();
        /**
         * @brief   写频率数据
         * @return  是否执行成功
         * @author  XingXuanCi (xingxuanci@diso.cn)
         * @date    2024-11-01
         */
        bool writeFrequencyDomain();
    };    
    Register2FITKIOAdaptorFactory(VAOneXML, Acoustics::FITKGlobalFrequencyDomain, VAOneXMLAdaptorFrequencyDomain)
}

#endif // VAONEXMLADAPTORFREQUENCYDOMAIN_H
